package com.teng.domain;

public class Student {
    private String name;
    private int age;
    private String sid;
    private String birthday;

    public Student() {
    }

    public Student(String name, String sid, int age, String birthday) {
        this.setName(name);
        this.setSid(sid);
        this.setAge(age);
        this.setBirthday(birthday);
    }

    public int getAge() {
        return age;
    }

    public String getName() {
        return name;
    }

    public String getBirthday() {
        return birthday;
    }

    public String getSid() {
        return sid;
    }

    public void setAge(int age) {
        if (age < 100 & age > 0) {
            this.age = age;
        } else {
            System.out.println("年龄有误！");
        }
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public void setSid(String sid) {
        this.sid = sid;
    }

    public void study() {
        System.out.println("正在学习");
    }
}
